package com.ruoyi.web.tdmdata.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.tdmdata.mapper.TdmZhongYaoZhuSheJiMapper;
import com.ruoyi.web.tdmdata.domain.TdmZhongYaoZhuSheJi;
import com.ruoyi.web.tdmdata.service.ITdmZhongYaoZhuSheJiService;

/**
 * ID-10 -21 中药注射剂Service业务层处理
 * 
 * @author ly
 * @date 2022-03-14
 */
@Service
public class TdmZhongYaoZhuSheJiServiceImpl implements ITdmZhongYaoZhuSheJiService 
{
    @Autowired
    private TdmZhongYaoZhuSheJiMapper tdmZhongYaoZhuSheJiMapper;

    /**
     * 查询ID-10 -21 中药注射剂
     * 
     * @param id ID-10 -21 中药注射剂主键
     * @return ID-10 -21 中药注射剂
     */
    @Override
    public TdmZhongYaoZhuSheJi selectTdmZhongYaoZhuSheJiById(Long id)
    {
        return tdmZhongYaoZhuSheJiMapper.selectTdmZhongYaoZhuSheJiById(id);
    }

    /**
     * 查询ID-10 -21 中药注射剂列表
     * 
     * @param tdmZhongYaoZhuSheJi ID-10 -21 中药注射剂
     * @return ID-10 -21 中药注射剂
     */
    @Override
    public List<TdmZhongYaoZhuSheJi> selectTdmZhongYaoZhuSheJiList(TdmZhongYaoZhuSheJi tdmZhongYaoZhuSheJi)
    {
        return tdmZhongYaoZhuSheJiMapper.selectTdmZhongYaoZhuSheJiList(tdmZhongYaoZhuSheJi);
    }

    /**
     * 新增ID-10 -21 中药注射剂
     * 
     * @param tdmZhongYaoZhuSheJi ID-10 -21 中药注射剂
     * @return 结果
     */
    @Override
    public int insertTdmZhongYaoZhuSheJi(TdmZhongYaoZhuSheJi tdmZhongYaoZhuSheJi)
    {
        tdmZhongYaoZhuSheJi.setCreateTime(DateUtils.getNowDate());
        return tdmZhongYaoZhuSheJiMapper.insertTdmZhongYaoZhuSheJi(tdmZhongYaoZhuSheJi);
    }

    /**
     * 修改ID-10 -21 中药注射剂
     * 
     * @param tdmZhongYaoZhuSheJi ID-10 -21 中药注射剂
     * @return 结果
     */
    @Override
    public int updateTdmZhongYaoZhuSheJi(TdmZhongYaoZhuSheJi tdmZhongYaoZhuSheJi)
    {
        tdmZhongYaoZhuSheJi.setUpdateTime(DateUtils.getNowDate());
        return tdmZhongYaoZhuSheJiMapper.updateTdmZhongYaoZhuSheJi(tdmZhongYaoZhuSheJi);
    }

    /**
     * 批量删除ID-10 -21 中药注射剂
     * 
     * @param ids 需要删除的ID-10 -21 中药注射剂主键
     * @return 结果
     */
    @Override
    public int deleteTdmZhongYaoZhuSheJiByIds(Long[] ids)
    {
        return tdmZhongYaoZhuSheJiMapper.deleteTdmZhongYaoZhuSheJiByIds(ids);
    }

    /**
     * 删除ID-10 -21 中药注射剂信息
     * 
     * @param id ID-10 -21 中药注射剂主键
     * @return 结果
     */
    @Override
    public int deleteTdmZhongYaoZhuSheJiById(Long id)
    {
        return tdmZhongYaoZhuSheJiMapper.deleteTdmZhongYaoZhuSheJiById(id);
    }
}
